﻿using UnityEngine;
using System.Collections;
namespace Room
{

    public class RCMoveBase : RCComponent
    {
        public MoveType type = MoveType.None;
        public RCMoveBase(RoomCharactor owner)
            :base(owner)
        {

        }

        public virtual void SetSpeed(float speed)
        {

        }

        public virtual void MoveTo(Vector3 to)
        {
        }

        public virtual void StopTo(Vector3 to)
        {

        }

        public virtual void LerpPosition(Vector3 to)
        {

        }

        public virtual void StopMove()
        {

        }

        public virtual bool IsMoving()
        {
            return false;
        }

        public virtual void RotateTo(float angleY)
        {
            TweenAction tweenComponent = owner.gameObject.AddMissingComponent<TweenAction>();
            TweenActionRotate actionRotate = new TweenActionRotate(owner.transform,
                new Vector3(0, angleY, 0), 0.2f, true);
            tweenComponent.RunAction(actionRotate);

        }

        public virtual void ResetPosition()
        {

        }
    }

}

